{% extends "base.html" %}
{% block title %}Categorias{% endblock %}
{% block head %}
    {{ super() }}

	<script type="text/javascript" src="/assets/js/jquery.js"></script>
  	<script type="text/javascript" src="/assets/js/jquery.validate.js"></script>

 	<script>
		$(document).ready(function() {   
			$(".table-grid tr:even").addClass("alt");
		}); 
  </script>
      
{% endblock %}
{% block content %}
	<h1>Administracion de Categorias</h1>
	<br>
	<table id="table-grid" class ="table-grid">
    	<tr>
        	<th width="20px"></th>
            <th width="350px">Nombre</th>
            <th width="100px">Tipo</th>
        </tr>
		{% for c in categories %}
    	<tr id="row{{ loop.index }}">
        	<td align="middle"><input  type="checkbox" name="list" value="{{ c.key }}" id="checkbox{{ loop.index }}"/></td>
          	<td >
            	<div ><a href="/category/edit?id_category={{ c.key().id() }}">{{ c.name|escape }}</a></div>
          	</td>
          	<td >
            	{{c.type}}
          	</td>
        </tr>
      	{% endfor %}
	</table>
    <table>
    	<tr>
        	<td><a class="newlink" href="/category/edit?id_category=-1">Nuevo</a> </td>
        </tr>
    </table>
    <br>
{% endblock %}
